package com.kennedy.atoupdate.beans;

import com.kennedy.atoupdate.beans.common.BaseEntity;

import javax.persistence.*;

@Table(name = "device_info")
public class DeviceInfo extends BaseEntity {
    /**
     * 设备唯一标识
     */
    @Column(name = "device_id")
    private String deviceId;

    /**
     * 组id
     */
    @Column(name = "group_id")
    private Long groupId;

    /**
     * 别名
     */
    @Column(name = "nick_name")
    private String nickName;

    @Transient
    private String groupName;

    public DeviceInfo() {
    }

    public DeviceInfo(String deviceId, String createTime) {
        this.deviceId = deviceId;
        super.setCreateTime(createTime);
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    /**
     * 获取设备唯一标识
     *
     * @return device_id - 设备唯一标识
     */
    public String getDeviceId() {
        return deviceId;
    }

    /**
     * 设置设备唯一标识
     *
     * @param deviceId 设备唯一标识
     */
    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    /**
     * 获取组id
     *
     * @return group_id - 组id
     */
    public Long getGroupId() {
        return groupId;
    }

    /**
     * 设置组id
     *
     * @param groupId 组id
     */
    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    /**
     * 获取别名
     *
     * @return nick_name - 别名
     */
    public String getNickName() {
        return nickName;
    }

    /**
     * 设置别名
     *
     * @param nickName 别名
     */
    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

}